package com.inno.life.common.enums;

import lombok.Getter;

/**
 * 提醒方式 0-无需提醒 1-短信提醒 2-邮件提醒 3-软件内部消息提醒
 */
@Getter
public enum RemindModeEnum {
    NO_REMIND("0", "无需提醒"),
    SMS("1", "短信提醒"),
    EMAIL("2", "邮件提醒"),
    SOFTWARE("3", "软件内部消息提醒");

    private final String code;
    private final String desc;

    RemindModeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static RemindModeEnum getEnumByCode(String code) {
        for (RemindModeEnum item : RemindModeEnum.values()) {
            if (item.getCode().equals(code)) {
                return item;
            }
        }
        return null;
    }

}
